import { request } from 'umi';

export async function list(params: any) {
  return request('/api/activity/page', {
    method: 'POST',
    data: params,
  });
}

export async function queryProvince(params: any) {
  return request('/api/bsArea/tree', {
    method: 'POST',
    data: params,
  });
}

export async function updateStatus(params: any) {
  // return request('/api/activity/updateActivityStatus', {
  //   method: 'POST',
  //   data: params,
  // });
  return request('/api/activity/updateById', {
    method: 'PUT',
    data: params,
  });
}

export async function updateTop(params: any) {
  return request('/api/doctor/isTop', {
    method: 'POST',
    data: params,
  });
}

export async function queryDetail(params: any) {
  return request('/api/activity/' + params.id, {
    method: 'get',
    data: params,
  });
}

export async function fakeSubmitForm(params: any) {
  return request('/api/activity/save', {
    method: 'POST',
    data: params,
  });
}

export async function update(params: any) {
  return request('/api/activity/updateById', {
    method: 'PUT',
    data: params,
  });
}
